/*
 * @Description: 
 * @Version: 2.0
 * @Author: , // 文件作者
 * @Date: 2023-07-03 22:44:48
 * @LastEditors: liujinkai
 * @LastEditTime: 2023-07-04 22:23:52
 */
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 0
  },
  mutations: {
    increment(state) {
      state.count++;
    }
  },
  actions: {
    increment(context) {
      context.commit('increment');
    }
  },
  getters: {
    getCount(state) {
      return state.count;
    }
  }
});

export default store;